import request from '@/utils/request'
import type { ApiResponse } from '../index'

// 目的地相关接口
export const destinationApi = {
  // 获取所有景点
  getList() {
    return request.get<ApiResponse>('/public/destinations')
  },
  
  // 获取景点详情
  getDetail(id: number) {
    return request.get<ApiResponse>(`/public/destinations/${id}`)
  },

  // 获取景点评论
  getComments(id: number) {
    return request.get<ApiResponse>(`/public/destinations/${id}/comments`)
  },

  // 搜索景点
  search(keyword: string) {
    return request.get<ApiResponse>('/public/destinations/search', {
      params: { keyword }
    })
  }
} 